package com.zt.common.common;

/**
 * description:
 * author:张腾
 * date:2021-05-21
 */

public enum CodeMsg implements BaseErrorInfo {

    /** 数据操作错误定义 */
    SUCCESS("200","成功！"),
    REDIRECT("30100","重定向"),
    BODY_NOT_MATCH("50100","请求的数据格式不符"),
    BIND_ERROR("50101","参数校验异常"),
    METHOD_NOT_MATCH("50102","请求的方法不支持"),
    INTERNAL_SERVER_ERROR("50103", "服务器内部错误"),
    NOT_FOUNT("50104","未知的运行时异常"),
    VERIFY_ERROR("50105","身份验证异常"),
    TOKEN_EXPIRE("50107","refresh token过期，请重新登录"),
    PERMISSION_DENIED("50108","没有权限访问"),

    USER_NOT_FOUND("50201","用户不存在"),
    WRONG_PASSWORD("50202","密码错误"),
    START_CLASS_TIME_CONFLICT("50203","开课时间冲突"),
    SELECT_CLASS_TIME_CONFLICT("50204","与已选课程时间冲突"),
    NOT_START_CLASS("50205","未到开课时间"),
    NOT_SELECT_CLASS("50206","未到选课时间"),
    NON_CANCELLATION("50207","必修课不可退选"),
    CLASS_TOO_MUCH("50208","学期选课不能超过七节"),
    SELECT_CLASS_NOT_OVER("50209","选课未结束，暂无课程表"),
    COURSE_EXISTED("50210","课程已存在"),
    CLASS_NOT_EXISTED("50211","该课堂id不存在"),
    HAVE_CLASS_ON("50212","您有正在上课的课堂"),
    RESOURCE_FORMAT_NOT_MATCH("50213","资源格式不符"),
    DEADLINE_HAS_EXPIRED("50214","已过截止时间"),
    CLASS_NOT_BELONG("50215","不属于您的课堂id"),
    RESOURCE_NOT_EXISTED("50216","资源不存在")
    ;

    /** 错误码 */
    private final String resultCode;
    /** 错误描述 */
    private final String resultMsg;

    CodeMsg(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }


    @Override
    public String getResultCode() {
        return this.resultCode;
    }

    @Override
    public String getResultMsg() {
        return this.resultMsg;
    }


}
